<template>
  <a-select v-model:value="selectValue" @change="selectChange">
    <a-select-option value="/allmonitor">全局监控</a-select-option>
    <a-select-option value="/smartMattress">智能床垫视图</a-select-option>
    <a-select-option value="/millimeterWaveRadar">毫米波雷达视图</a-select-option>
    <a-select-option value="/newBraceletmonitoring">智能手环视图</a-select-option>
  </a-select>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { router } from "/@/router";
export default defineComponent({
  name: "monitorSelect",
  props: {
    value: {
      type: String,
      default: "",
    },
  },
  emits: ["change"],
  setup(props, { emit }) {
    const { value } = props;
    const selectValue = value;
    const selectChange = (e) => {
      emit("change", e);
      router.push(e);
    };
    return {
      selectValue,
      selectChange,
    };
  },
});
</script>
